<script setup lang='ts'>

const inputChange = (value: number, e: Event) => {
  console.log(value);

  console.log((e.target as HTMLInputElement).value);
}

const onEnter = (e: KeyboardEvent) => {
  console.log(e.key);
}

const clickMe = (e: MouseEvent) => {
  console.log(e.clientX);

}
</script>

<template>
  <div>
    <input type="text" @input="inputChange(1, $event)" @keyup.enter="onEnter">
    <button @click="clickMe">点我</button>
  </div>
</template>

<style scoped></style>